Ext.ns('list');
list.store = null;
//create store for brand coupon
list.createStore = function(project_name) {
	store = new Ext.data.JsonStore( {
		url : '/'+project_name+'/product/search?is_admin=1',
		root : 'data',
		fields : [ "id","type", "price","note", "image"],
		disableCaching : false,
		autoLoad: true,
		remoteSort : true
	});
	
	store.on('beforeload', function() {
		//common.loading(true);		
    });

	store.on('load', function() {
		
 	});

	store.on('loadexception', function() {
		//common.loading(false);
	});
	return store;
}

list.createGrid= function(project_name,grid_id) {	
	$.ajax({
		  type: "get",
		  url : '/'+project_name+'/product/search?is_admin=1',
		  data: { name: "John", location: "Boston" },
		  success: function(data) {
		    console.log(data);
			$("#"+grid_id).html(data);
		  }
		});
}